package com.base.saas.delivery.controller;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import lombok.extern.slf4j.Slf4j;

/**
 * @author 王清亮
 * @date 2025/10/3 20:11
 * @description TODO
 */
@Slf4j
public class DeliveryBlockHandler {
    // 方法签名必须与原方法一致，最后加一个 BlockException 参数
    public static String handleBlockException(String name, BlockException ex) {
        log.warn("请求被限流，name: {}", name);
        return "request blocked for name: " + name;
    }
}
